package ningbo.oopextends;

/**
 * @Author 宁铂
 * @Date 2021/7/12 9:05
 * @Version 1.0
 */
public class TestExtends {
    //测试构造方法的继承
    public static void main(String[] args) {
        a x = new a();
        b  z= new b();

    }
}

class a{
    public a(){
        System.out.println("无参");
    }
    public a(int c){
        System.out.println(c);
    }
}

class b extends a{
    public b(){
        super(5);
        System.out.println("传参");
    }
}